import javax.swing.JPanel;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.LayoutStyle.ComponentPlacement;

import java.awt.Dimension;

import javax.swing.JButton;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

import javax.swing.border.TitledBorder;
import javax.swing.border.LineBorder;

import java.awt.Color;


public class PanelTimer3 extends JPanel {
	private SetRecTime setRecStartTime, setRecStopTime;
	private RecRange pauseTime, recTime;
	private SetPeriod startDay, stopDay;
	/**
	 * Create the panel.
	 */
	public PanelTimer3() {
		setPreferredSize(new Dimension(872, 336));
		setRecStartTime = new SetRecTime("Start rec");
		setRecStartTime.setPreferredSize(new Dimension(400, 280));
		setRecStopTime = new SetRecTime("Stop rec");
		setRecStopTime.setPreferredSize(new Dimension(400, 280));
		startDay = new SetPeriod("Start day");
		stopDay = new SetPeriod("Stop day");
		
		pauseTime = new RecRange("Pause Time");
		recTime = new RecRange("Recording Time");
		add(pauseTime);
		add(recTime);
		GroupLayout groupLayout = new GroupLayout(this);
		groupLayout.setHorizontalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addContainerGap(12, Short.MAX_VALUE)
					.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
						.addGroup(Alignment.TRAILING, groupLayout.createSequentialGroup()
							.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
								.addGroup(groupLayout.createSequentialGroup()
									.addGap(2)
									.addComponent(startDay, GroupLayout.PREFERRED_SIZE, 122, GroupLayout.PREFERRED_SIZE))
								.addComponent(stopDay, GroupLayout.PREFERRED_SIZE, 124, GroupLayout.PREFERRED_SIZE))
							.addPreferredGap(ComponentPlacement.RELATED)
							.addComponent(setRecStartTime, GroupLayout.PREFERRED_SIZE, 309, GroupLayout.PREFERRED_SIZE)
							.addGap(6))
						.addGroup(Alignment.TRAILING, groupLayout.createSequentialGroup()
							.addComponent(recTime, GroupLayout.PREFERRED_SIZE, 257, GroupLayout.PREFERRED_SIZE)
							.addGap(29)))
					.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
						.addGroup(groupLayout.createSequentialGroup()
							.addPreferredGap(ComponentPlacement.RELATED)
							.addComponent(setRecStopTime, GroupLayout.PREFERRED_SIZE, 300, GroupLayout.PREFERRED_SIZE))
						.addGroup(groupLayout.createSequentialGroup()
							.addGap(27)
							.addComponent(pauseTime, GroupLayout.PREFERRED_SIZE, 248, GroupLayout.PREFERRED_SIZE)))
					.addContainerGap(115, Short.MAX_VALUE))
		);
		groupLayout.setVerticalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
						.addGroup(groupLayout.createSequentialGroup()
							.addGap(66)
							.addComponent(startDay, GroupLayout.PREFERRED_SIZE, 76, GroupLayout.PREFERRED_SIZE)
							.addGap(6)
							.addComponent(stopDay, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE))
						.addGroup(groupLayout.createSequentialGroup()
							.addContainerGap()
							.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
								.addComponent(setRecStartTime, GroupLayout.PREFERRED_SIZE, 225, Short.MAX_VALUE)
								.addComponent(setRecStopTime, 0, 0, Short.MAX_VALUE))))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
						.addComponent(recTime, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addComponent(pauseTime, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
					.addGap(24))
		);
		setLayout(groupLayout);

	}
	/**
	 * @return the setRecStartTime
	 */
	public SetRecTime getSetRecStartTime() {
		return setRecStartTime;
	}
	/**
	 * @param setRecStartTime the setRecStartTime to set
	 */
	public void setSetRecStartTime(SetRecTime setRecStartTime) {
		this.setRecStartTime = setRecStartTime;
	}
	/**
	 * @return the setRecStopTime
	 */
	public SetRecTime getSetRecStopTime() {
		return setRecStopTime;
	}
	/**
	 * @param setRecStopTime the setRecStopTime to set
	 */
	public void setSetRecStopTime(SetRecTime setRecStopTime) {
		this.setRecStopTime = setRecStopTime;
	}
	/**
	 * @return the startDay
	 */
	public SetPeriod getStartDay() {
		return startDay;
	}
	/**
	 * @param startDay the startDay to set
	 */
	public void setStartDay(SetPeriod startDay) {
		this.startDay = startDay;
	}
	/**
	 * @return the stopDay
	 */
	public SetPeriod getStopDay() {
		return stopDay;
	}
	/**
	 * @param stopDay the stopDay to set
	 */
	public void setStopDay(SetPeriod stopDay) {
		this.stopDay = stopDay;
	}
	/**
	 * @return the pauseTime
	 */
	public RecRange getPauseTime() {
		return pauseTime;
	}
	/**
	 * @param pauseTime the pauseTime to set
	 */
	public void setPauseTime(RecRange pauseTime) {
		this.pauseTime = pauseTime;
	}
	/**
	 * @return the recTime
	 */
	public RecRange getRecTime() {
		return recTime;
	}
	/**
	 * @param recTime the recTime to set
	 */
	public void setRecTime(RecRange recTime) {
		this.recTime = recTime;
	}
}
